package com.aaa.a1104.demo03;

import java.util.ArrayList;
import java.util.Collections;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test01 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list, "张无忌", "周芷若", "赵敏", "张强", "张三丰");

        list.stream()
                .filter(item->item.startsWith("张"))
                .filter(item->item.length()==3)
                .forEach(item-> System.out.println(item));

    }
}
